﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Collections.ObjectModel;

namespace NativeWiFiLibrary
{
    public static class NativeWiFi
    {
        private static List<NetworkDevice> _networkDevices = null;

        /// <summary>
        /// Returns all available network devices.
        /// </summary>
        /// <returns></returns>
        public static List<NetworkDevice> NetworkDevices
        {
            get
            {
                if (_networkDevices == null)
                {
                    using (WlanManager wlanManager = new WlanManager())
                    {
                        _networkDevices = wlanManager.GetNetworkDevices();
                    }
                }

                return _networkDevices;
            }
        }
    }
}
